package mvc.struts.annotation.entity;

import java.util.HashMap;
import java.util.Map;

public class View {

	private String path;
	
	private Map<String, Object>	model;
	
	/**
	 * 
	 * @param path
	 */
	public View(String path)
	{
		this.path = path;
		model = new HashMap<String, Object>();
	}
	
	/**
	 * 
	 * @param key
	 * @param value
	 * @return
	 */
	public View addModel(String key, Object value)
	{
		model.put(key, value);
		
		return	this;
	}

	/**
	 * 
	 * @return
	 */
	public String getPath() {
		
		return path;
	}
	
	/**
	 * 
	 * @return
	 */
	public Map<String, Object> getModel() {
		
		return model;
	}
}
